<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>CSS盒子模型示例</title>
    <style>
        .box {
            width: 200px;
            height: 100px;
            background-color: #6c5ce7;
            color: white;
            padding: 20px;
            border: 5px solid #e60012;
            margin: 20px;
            box-sizing: border-box; /* 使用border-box模型 */
            text-align: center;
            line-height: 1.5;
        }
        .box:nth-child(1) {
            background-color: #6c5ce7;
        }
        .box:nth-child(2) {
            background-color: #f093fb;
        }
        .box:nth-child(3) {
            background-color: #4facfe;
        }
        .container {
            display: flex;
            gap: 10px;
            justify-content: space-around;
            padding: 20px;
            background-color: #f9f9f9;
            border: 1px dashed #ccc;
            width: 80%;
            margin: 20px auto;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box">内容区<br>padding: 20px</div>
        <div class="box">边框<br>border: 5px solid</div>
        <div class="box">外边距<br>margin: 20px</div>
    </div>
</body>
</html>